package cn.hdu.liang.ch4;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class MyAddress {
    public static void main(String[] args) {
        try {
            InetAddress address = InetAddress.getLocalHost();
            System.out.println(address);
        } catch(UnknownHostException e) {
            System.out.println("无法找到本机的地址");
        }
    }
}
